<?php
/**
 * Created by PhpStorm.
 * User: kcswag
 * Date: 12/9/17
 * Time: 5:15 PM
 */

namespace AppBundle\Controller;


use AppBundle\Entity\Borrowers;
use AppBundle\Libs\Loan;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use AppBundle\Utils\Curl;

/**
 * Class LoanController
 * @package AppBundle\Controller
 * @Route("/installment/loan")
 */
class LoanController extends Controller
{
    private $loan;


    public function __construct(Loan $loan)
    {
        $this->loan = $loan;
    }


    /**
     * @Route("/make_loan/{id}")
     */
    public function loanToBorrower(Borrowers $borrower){

        $this->loan->makeLoans($borrower);
    }
}